<?php


/**
 * 过滤Tp查询结果的数据类型
 * 不能对ViewModel，因为ViewModel没有保存对应表的字段类型
 */


namespace Android\Model;

use Think\Model;

class BaseModel extends Model {

    protected function _after_select(&$resultSet, $options)
    {
        foreach ($resultSet as &$result) {
            $this->_after_find($result, $options);
        }
    }
    protected function _after_find(&$result, $options)
    {
        foreach ($result as $field => $value) {
            $this->_parseType($result, $field);
        }
    }

}